package com.hqyj.controller;

import com.hqyj.pojo.Settle;
import com.hqyj.service.SettleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

@RestController
@RequestMapping("settle")
public class SettleController {
    @Autowired
    SettleService settleService;

    //加载表格数据
    @RequestMapping("/settleList")
    public  HashMap<String,Object> listPage(Settle s){
        return settleService.select(s);
    }
    //修改
    @RequestMapping("/update")
    public HashMap<String,Object>  update(Settle s){
        return settleService.update(s);
    }
    //新增
    @RequestMapping("/add")
    public HashMap<String,Object> add(Settle s){
        return settleService.add(s);
    }

    //删除
    @RequestMapping("/del")
    public HashMap<String,Object> del(Integer id){
        return settleService.del(id);
    }

}
